package com.zhihaoliang.bezier.home

import android.content.Intent
import com.zhihaoliang.bezier.base.BaseActivity
import com.zhihaoliang.bezier.bezier.BezierActivity
import com.zhihaoliang.bezier.cubic.CubicBezierActivity
import com.zhihaoliang.bezier.databinding.ActivityHomeBinding

class HomeActivity : BaseActivity<ActivityHomeBinding>(), HomeCallback {

    override fun initDataBinding() = ActivityHomeBinding.inflate(layoutInflater)

    override fun initView() {
        super.initView()

        dataBinding.callback = this
    }


    override fun onShowBezier() = startActivity(Intent(this, BezierActivity::class.java))


    override fun onShowCubicBezier() = startActivity(Intent(this, CubicBezierActivity::class.java))


}

interface HomeCallback {
    /**
     * 跳转到到七阶的贝塞尔
     */
    fun onShowBezier()

    /**
     * 跳转到 CubicBezierEasing 的贝塞尔曲线的展示
     */
    fun onShowCubicBezier()
}
